<#assign contextPath=springMacroRequestContext.getContextPath() />
<#import "/public/frame/main.html" as frame />
<@frame.head "南航明珠商城-商品列表">
</@frame.head>
<link rel="stylesheet" type="text/css" href="${contextPath}/resources/css/search_table.css" />
<nav class="breadcrumb"><i class="Hui-iconfont">&#xe67f;</i> 后台管理中心 <span class="c-gray en">&gt;</span>财务管理 <span class="c-gray en">&gt;</span> 南航对账 <a class="btn btn-success radius r" style="line-height:1.6em;margin-top:3px" href="javascript:location.replace(location.href);" title="刷新" ><i class="Hui-iconfont">&#xe68f;</i></a></nav>
<div class="page-container">
<form method="post" name="query_nanhang_form"  id="query_nanhang_form" action="${contextPath}/nanhang/nanhang_order_list" >    
   <input type="hidden" name="page" value="${pagination.pageNo}"  id="page" />                          
    <div class="text-c">
        <table class="table search_table">
		  <tr>  
            <td>订单编号：</td>
            <td>
             <input type="text" onkeyup="(this.v=function(){this.value=this.value.replace(/[^0-9-]+/,'');}).call(this)" onblur="this.v();" class="input-text radius" placeholder="订单编号" id="orderId" name="orderId" value="${(orderDetailQo.orderId?c)!}" >
            </td>
            <td> 开始时间：</td>
            <td> 
          	   <input onfocus="WdatePicker({ maxDate:'#F{$dp.$D(\'transTimeEnd\')||\'%y-%M-%d\'}',readOnly: true })" 
          	   id="transTimeStart" name="transTimeStart" value="<#if orderDetailQo.transTimeStart?? >${orderDetailQo.transTimeStart?date}</#if>" 
           	   class="input-text Wdate">
           	 </td>
             <td> 结束时间：</td>
             <td>
                <input onfocus="WdatePicker({ minDate:'#F{$dp.$D(\'transTimeStart\')}',maxDate:'%y-%M-%d',readOnly: true })"
               	id="transTimeEnd"   name="transTimeEnd" value="<#if orderDetailQo.transTimeEnd?? >${orderDetailQo.transTimeEnd?date}</#if>" 
               	class="input-text Wdate">
           </td>
		  </tr>
          <tr>
           <td>订单状态：</td>
           <td>
            	<span class="select-box radius">
	           	    <select class="select" name="orderState" id="orderState" >
					    <option value="" >全部</option>
					    <option <#if orderDetailQo.orderState==1 > selected="selected" </#if> value="1" >未支付</option>
					    <option <#if orderDetailQo.orderState==2 > selected="selected" </#if> value="2" >已支付</option>
					    <option <#if orderDetailQo.orderState==3 > selected="selected" </#if> value="3" >信息不正确</option>
					    <option <#if orderDetailQo.orderState==4 > selected="selected" </#if> value="4" >挂起</option>
					    <option <#if orderDetailQo.orderState==5 > selected="selected" </#if> value="5" >发货</option>
					    <option <#if orderDetailQo.orderState==6 > selected="selected" </#if> value="6" >已发货</option>
					    <option <#if orderDetailQo.orderState==7 > selected="selected" </#if> value="7" >订单已取消</option>
					    <option <#if orderDetailQo.orderState==8 > selected="selected" </#if> value="8" >已签收</option>
					    <option <#if orderDetailQo.orderState==9 > selected="selected" </#if> value="9" >已退款</option>
					    <option <#if orderDetailQo.orderState==10 > selected="selected" </#if> value="10" >已拒签</option>
					    <option <#if orderDetailQo.orderState==11 > selected="selected" </#if> value="11" >支付处理中</option>
					    <option <#if orderDetailQo.orderState==12 > selected="selected" </#if> value="12" >支付失败</option>
					    <option <#if orderDetailQo.orderState==13 > selected="selected" </#if> value="13" >发放成功</option>
					    <option  <#if orderDetailQo.orderState==14 > selected="selected" </#if> value="14" >发放中</option>
              		</select>
                </span>
           </td>
           <td></td>
           <td colspan="3">
           	 <input class="btn btn-success radius" type="button"  onclick="search();" value="查询"/>
             <input class="btn btn-success radius" type="button"  onclick="excelAll();" value="导出"/>
           </td>
         </tr>
      </table>
    </div>
</form>

    <div class="cl pd-5 bg-1 bk-gray mt-20"> 
  
    
    <span class="r">共有数据：<strong> ${pagination.totalCount} </strong> 条</span> </div>
    <table class="table table-border table-bordered table-bg">
        <thead>
        
        <tr   class="text-c">
            <!-- <th width="45px">
            <input  type="checkbox" id="selectAll" disabled="disabled" onclick="checkAll()"/>
            </th> -->
            <th  > 交易时间</th>
            <th >订单编号</th>
            <th >用户卡号</th>
            <th >订单里程</th>
            <th  > 订单状态</th>
            <th  > 物流费用</th>
              <th width="50" >操作</th>
        </tr>
        </thead>
        <tbody>
       <#if pagination.list?? && (pagination.list?size &gt; 0) >
        <#list pagination.list as orders> 
        	 <tr>
        	   	<td >${(orders.order.orderPayInfo.transTime?string("yyyy-MM-dd HH:mm:ss"))!}  </td>
        	   	<td >  
        	   	${orders.order.id}
        	   </td>
 				<td>   ${orders.order.memberCardName }  </td>
 				
 				 <td>  	 ${orders.order.orderPayInfo.mileages }
 				 </td>
                
	 			<td>
					<#if orders.order.state==1 >未支付
					<#elseif orders.order.state==2  > 已支付
			 		<#elseif orders.order.state==3  > 信息不正确
	               	<#elseif orders.order.state==4  > 挂起
	                <#elseif orders.order.state==5  >	发货
             	    <#elseif orders.order.state==6  > 已发货
    		        <#elseif orders.order.state==7  > 订单已取消
                   	<#elseif orders.order.state==8  > 已签收
                    <#elseif orders.order.state==9  > 已退款
                    <#elseif orders.order.state==10  >已拒签
                    <#elseif orders.order.state==11  > 支付处理中
					<#elseif orders.order.state==12  > 支付失败
                    <#elseif orders.order.state==13  > 发放成功
                    <#elseif orders.order.state==14  > 发放中
                 	</#if>  
	 				
	 			</td>
	 			<td>
 			 	 <#if (orders.order.freight)?? >${orders.order.freight }
 			 	 <#else>
 			 	 0.0
 			 	 </#if>
	 			</td>
 			 	<td>
 			 	 <a href="javascript:excelOne('${orders.order.id}')"  ><font color="blue">导出</font></a>
 			 	</td>
        	 </tr>
      </#list></#if>
     </tbody>
    </table>
    <div id="biuuu_city" style="padding-top: 10px;float: right"></div>
</div>
<@frame.end "default">
</@frame.end>

<script type="text/javascript" src="${contextPath}/resources/lib/My97DatePicker/4.8/WdatePicker.js"></script>
<script type="text/javascript" src="${contextPath}/resources/js/laypage/laypage.js"></script>
<script type="text/javascript" src="${contextPath}/resources/js/order/search_order_list.js"></script>
<script type="text/javascript">
var path="${contextPath}";
laypage({
    cont: 'biuuu_city',//容器。值支持id名、原生dom对象，jquery对象。
    pages: ${pagination.totalPage},//通过后台拿到的总页数
    curr:  ${pagination.pageNo} || 1, //当前页
    skip: true, //是否开启跳页
	first: 1, //将首页显示为数字1,。若不显示，设置false即可
	last: ${pagination.totalPage}, //将尾页显示为总页数。若不显示，设置false即可
    jump: function(obj , first){//触发分页后的回调
        if(!first){ //点击跳页触发函数;当前页为obj.curr
          $(page).val(obj.curr);//获取点击的页码
          $(query_nanhang_form).submit();
        }
    }
})  
function search(){
    $("#page").val("1");
    $("#query_nanhang_form").attr("action",path+"/nanhang/nanhang_order_list").submit();
}	
function excelOne(id){
	 window.open(path + "/nanhang/nanhang_excel?id="+id); 
}	
function excelAll(){
	$("#query_nanhang_form").attr("action",path+"/nanhang/nanhang_excel").submit();
}	
</script>
</body>

</html>
 
